/**
 * 
 */
package br.com.consultsystems.negocio.impl.financeiro;

import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import br.com.consultsystems.dominio.financeiro.Classe;
import br.com.consultsystems.negocio.spec.financeiro.ClasseNegocio;
import br.com.consultsystems.persistencia.spec.financeiro.ClassePersistencia;

/**
 * @author Moralles
 *
 */
@Stateless(name = "classeNegocio")
public class ClasseNegocioImpl implements ClasseNegocio {

	@EJB
	private ClassePersistencia classePersistencia;
	
	@Override
	public Classe merge(Classe t) throws Exception {
		return classePersistencia.merge(t);
	}

	@Override
	public Classe retrieve(Long id) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void remove(Classe t) throws Exception {
		t = this.merge(t);
		classePersistencia.remove(t);
	}

	@Override
	public void refresh(Classe t) throws Exception {
		classePersistencia.refresh(t);
	}

	@Override
	public List<Classe> retrieveAll() throws Exception {
		return classePersistencia.retrieveAll();
	}

	@Override
	public List<Classe> retrieveByFilter(String nome) throws Exception {
		return classePersistencia.retrieveByClasse(nome);			
	}

	
}
